package com.dz.xjd.ui.fragment;

import android.view.View;
import android.widget.AdapterView;
import android.widget.GridView;
import com.dz.xjd.R;
import com.dz.xjd.ui.adapter.IdentifyAdapter;
import com.dz.xjd.ui.base.BaseFragment;
import com.orhanobut.logger.Logger;

import butterknife.BindView;

/**
 * Created by dz on 2017/7/19.
 */

public class IdentifyFragment  extends BaseFragment {

    @BindView(R.id.gv_identify)
    GridView gridView;

 /*   @BindView(R.id.btn_identify_submit)
    Button mBtnSubmit;*/



    private IdentifyAdapter adapter;
    private String[] titles = {"身份认证","个人信息认证","手机认证","银行卡认证","联系人认证","职业认证"};
    private int[] images = {R.drawable.test, R.drawable.test, R.drawable.test, R.drawable.test, R.drawable.test, R.drawable.test};

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_identify;
    }

    @Override
    protected void initView() {
        adapter = new IdentifyAdapter(titles, images, getActivity());
        gridView.setAdapter(adapter);
        gridView.setOnItemClickListener(mOnItemClickListener);
    }

    @Override
    public void initPresenter() {

    }


    private AdapterView.OnItemClickListener mOnItemClickListener = new AdapterView.OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
            Logger.d("i--------"+i);
        }
    };
}
